<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
%>
<html>
<head>
    <title>个人中心-寻亲启事</title>
</head>
<body>
    <table class="table">
    <thead>
    <tr>
        <th width="50">序号</th>
        <th width="100">照片</th>
        <th width="100">姓名</th>
        <th width="100">失踪类型</th>
        <th width="100">状态</th>
        <th width="150">发布时间</th>
        <th width="150">操作</th>
    </tr>
    </thead>
    <c:forEach items="${requestScope.pageInfo.list}" var="information" varStatus="stat">
    <tr>
        <td  rowspan="2">
            <span class="pending">${stat.count}</span>
        </td>
        <td>
            <img style="margin-top:-8px" width="50px" height="50px" src="<%=path %>/web/uploadImages/${information.pic}">
        </td>
        <td class="manage-jobs-title"><a href="<%=path %>/web/information/showList?id=${information.id}"target="_blank">${information.name}</a>
        </td>
        <td class="manage-jobs-title">
            ${information.losttype.title}
        </td>
        <c:if test="${information.enable eq true}">
        <td class="manage-jobs-title">
            已通过
        </td>
        </c:if>
        <c:if test="${information.enable eq false}">
            <td class="manage-jobs-title">
                未通过
            </td>
        </c:if>
        <c:if test="${information.enable eq NULL}">
            <td class="manage-jobs-title">
                等待审核
            </td>
        </c:if>
        <td class="table-date">
            <fmt:formatDate value="${information.inputTime}" pattern="yyyy-MM-dd"/>
        </td>
        <td>
            <a href="javascript:void(0)" class="find" data-id="${information.id}"><img src="<%=path %>/web/static/img/find.png" width="20px" height="20px"/></a>
            <c:if test="${(information.enable eq NULL)||(information.enable eq false)}">
                <a target="_parent" href="<%=path %>/web/userinfo/updateByInformationId?informationId=${information.id}"><img src="<%=path %>/web/userinfo/img/member_center/update.jpg" width="20px" height="20px"/></a>
            </c:if>
            <c:if test="${information.enable eq false}">
                <a data-title="${information.news}" class="check-info" href="javascript:void(0)"><img src="<%=path %>/web/userinfo/img/member_center/check.png" width="20px" height="20px"/></a>
            </c:if>
            <a href="javascript:void(0)" class="delete" data-id="${information.id}"><img src="<%=path %>/web/userinfo/img/member_center/delete.jpg" width="20px" height="20px"/></a>
        </td>
    </tr>
    <tr class="wm-course-count">
        <td colspan="6">
            <div>
                <span>浏览：${information.browse}</span> <span>线索：5</span>
            </div>
        </td>
    </tr>
    </c:forEach>

    </tbody>
</table>
    <div class="pagination-box-row" style="bottom:0px;position:absolute;width:830px">

    <p>
    <div class="meneame">
        <%--            <c:if test="${requestScope.pageInfo.pageNum eq 1}" var="result">--%>
        <%--                <span class="disabled"> < </span>--%>
        <%--            </c:if>--%>
        <%--            <c:if test="${not result}">--%>
        <%--                <a href="" data-id="${requestScope.pageInfo.pageNum}> < </a>--%>
        <%--            </c:if>--%>

        <c:forEach begin="1" end="${requestScope.pageInfo.pages}" var="i">
            <c:if test="${requestScope.pageInfo.pageNum eq i}" var="isCur">
                <a class="current" data-id="${i}">${i}</a>
            </c:if>
            <c:if test="${not isCur}">
                <a href="#" data-id="${i}">${i}</a>
            </c:if>
        </c:forEach>
        <%--             <a href="#?page=2"> > </a>--%>
    </div>
    </p>

</div>
</body>
<script src="<%=path %>/web/static/js/modules/jquery-3.4.1.min.js"></script>
<script src="<%=path %>/web/static/layui/layui.all.js"></script>
</html>
<script>
    $(function () {
        $("a.check-info").click(function () {
            var info = $(this).data("title");
            layer.open({
                type: 1,
                title:"驳回理由",
                area: ['500px', '250px'],
                content:  '\<\div style="padding:20px;color:red;">您提交的寻亲信息审核未通过，驳回理由如下:\<\/div>'+'\<\div style="padding:20px;">'+info+'</div>'
            });
        })
        
    })

</script>